package com.lz.yz.order.enumeration;

/**
 * 订单类型枚举
 * 订单类型 1-赋能,2-找大咖,3-平摊,4-10元Get
 */
public enum OrderType {

    QUESTIONBUFF("QUESTIONBUFF", 1),
    REWARD("REWARD", 2),
    FLAT("FLAT", 3),
    GET("GET", 4);


    private String status;
    private Integer statusValue;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getStatusValue() {
        return statusValue;
    }

    public void setStatusValue(Integer statusValue) {
        this.statusValue = statusValue;
    }

    OrderType(String status, Integer statusValue) {
        this.status = status;
        this.statusValue = statusValue;
    }

    public static OrderType getOrderTypeByIndex(int index) {
        for (OrderType c : OrderType.values()) {
            if (c.getStatusValue() == index) {
                return c;
            }
        }
        return null;
    }
}
